package com.xhdx.java8;

import java.util.Arrays;
import java.util.List;
/**
 * 方法引用实例
 */
public class Test1 {
   public static void main(String args[]){
       System.out.println("构造器引用");
       Tea tea = Tea.create( Tea::new );
       List< Tea > teaList = Arrays.asList( tea );
       
       System.out.println("静态方法引用");
       teaList.forEach( Tea::staticCollide );
       System.out.println("特定类的任意对象的方法引用");
       teaList.forEach( Tea::repairs );
       System.out.println("特定对象的方法引用");
       teaList.forEach( tea::other );
   }
}